package thread;

public class DeamonTreadDemo {
    public static void main(String[] args) {
        Thread ros = new Thread() {
            public void run() {
                for (int i = 0; i < 3; i++) {
                    System.out.println("let me go ");
                    try {
                        Thread.sleep(1000);
                    } catch (InterruptedException e) {
                        e.printStackTrace();
                    }
                }
                System.out.println("aaaaaaaa");
            }
        };
        Thread jack = new Thread() {
            public void run() {
                while (true) {
                    System.out.println("you jump,i jump");
                    try {
                        Thread.sleep(1000);
                    } catch (InterruptedException e) {
                        e.printStackTrace();
                    }
                }
            }
        };
        ros.start();
        jack.setDaemon(true);
        jack.start();
        //while (true);
    }


}
